import http from "../../utils/request"
import qs from 'qs'

//请求部门数据
export const listDeptTree = (params) =>{
  return http.post('/dept/listDeptTree',qs.stringify(params));
}
//条件请求部门数据
export const listQueryDeptTree = (data) =>{
  return http.post('/dept/listQueryDeptTree',qs.stringify(data));
}
//添加修改
export const saveOrUpdateDept = (data) =>{
  return http.post('/dept/saveOrUpdateDept',qs.stringify(data));
}
//查找一条
export const editDept = (data) =>{
  return http.post('/dept/editDept/'+data.deptId);
}
//删除
export const delDept = (data) =>{
  return http.get('/dept/delDept/'+data.deptId);
}

export default {
  listDeptTree,
  listQueryDeptTree,
  saveOrUpdateDept,
  editDept,
  delDept
}
